<!--
 * @Description: 
 * @Version: V1.0.0
 * @Author: 周艳凯 484894717@qq.com
 * @Date: 2024-09-27 16:48:55
 * @LastEditors: 周艳凯 484894717@qq.com
 * @LastEditTime: 2024-10-09 11:00:31
 * @FilePath: index.vue
 * Copyright 2024 Marvin, All Rights Reserved. 
 * 2024-09-27 16:48:55
-->
<template>
  <div :class="classNames">
    <div class="arco-card-header">
      <div class="arco-card-header-title">{{ title }}</div>
      <div class="arco-card-header-extra">
        <a class="arco-link arco-link-status-normal">
          <slot name="extra"></slot>
        </a>
      </div>
    </div>
    <div class="arco-card-body">
      <slot></slot>
    </div>
  </div>
</template>

<script lang="ts">
import { computed, defineComponent } from "vue";
const icon = defineComponent({
  name: "Card",
  options: {
    // 虚拟化节点
    virtualHost: true,
  },
  props: {
    title: {
      type: String,
      required: true,
    },
    size: {
      type: String,
      default: "medium",
    },
    bordered: {
      type: Boolean,
      default: true,
    },
  },
  setup(props) {
    const prefixCls = "arco-card";
    const classNames = computed(() => {
      return [
        prefixCls,
        `${prefixCls}-size-${props.size}`,
        {
          [`${prefixCls}-bordered`]: props.bordered,
        },
      ];
    });
    return {
      classNames,
    };
  },
});
export default icon;
</script>

<style scoped lang="scss">
@import "./index.scss";
</style>
